import { http } from '@/utils/http.js'
//获取验证码
export function verifyCodeApi(data) {
  return http.request({
    url: '/code',
    data: {
      ...data
    }
  })
}
/**
 * 绑定手机号
 */
export const bindingMobileApi = (data) => {
  return http.post('/login/binding', data)
}
/**
 * QQ登录
 */
export const QQLoginApi = (data) => {
  return http.post('/login/thirdparty', data)
}

//验证码登陆
export const loginByMobileApi = (data) => {
  return http.request({
    method: 'POST',
    url: '/login',
    data
  })
}

//账号密码登录
export const loginByPassWordApi = (data) => {
  return http.request({
    method: 'POST',
    url: '/login/password',
    data
  })
}

//获取个人信息
export const userInfoApi = () => {
  return http.request({
    url: '/patient/myUser'
  })
}
